export const isNull = [
  {
    required: true,
    message: "不能为空",
  },
];

export const IDCardNumber = [
  ...isNull,
  {
    pattern: /^[0-9]{17}[0-9Xx]{1}$/,
    message: "身份证格式不正确",
  },
];
export const CarId = [
  ...isNull,
  {
    pattern: /^([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[a-zA-Z](([DF]((?![IO])[a-zA-Z0-9](?![IO]))[0-9]{4})|([0-9]{5}[DF]))|[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1})$/,
    message: "车牌格式不正确",
  },
];
export const phone = [
  ...isNull,
  {
    pattern: /^1[3456789]\d{9}$/,
    message: "手机格式不正确",
  },
];


export const Number = [
  ...isNull,
  {
    pattern: /^[1-9][0-9]*([\.][0-9]{1,2})?$/,
    message: "只能输入数字或小数",
  },
];